package com.atguigu.jxc.service;

import com.atguigu.jxc.domain.ServiceVO;
import com.atguigu.jxc.entity.Goods;

import java.util.List;
import java.util.Map;

public interface GoodsService {


    Integer count();

    ServiceVO getCode();

    /**
     * 查询库存
     * @param page
     * @param rows
     * @param codeOrName
     * @param goodsTypeId
     * @return
     */
    List<Goods> getlistInventory(Integer page, Integer rows, String codeOrName, Integer goodsTypeId);

    //商品信息
    Map<String, Object> list(Integer page, Integer rows, String goodsName, Integer goodsTypeId);

    //添加
    ServiceVO save(Goods goods);

    //删除
    ServiceVO delete(Integer goodsId);

    //无库存信息
    Map<String, Object> getNoInventoryQuantity(Integer page, Integer rows, String nameOrCode);

    //有库存
    Map<String, Object> getHasInventoryQuantity(Integer page, Integer rows, String nameOrCode);

    //添加预期库存
    ServiceVO saveStock(Integer goodsId, Integer inventoryQuantity, double purchasingPrice);

    //删除库存
    ServiceVO deleteStock(Integer goodsId);
}
